<?php
class AccountModel extends Model {
	public function get_primary_key() {
		return $this->primary_key = 'id'; //设置主键
	}
	public function get_fields() {
		return $this->get_table_fields();
	}

	public function accountOperate($data){
		try {
			$time = time();
			$updateData = array(
				'status'=>$data['status'],	//认证状态  0：未认证  1：审核中  2：已认证 3：驳回
				'updatetime'=>$time,
			);
			$this->db->where('id', $data['id']);
			$this->db->update('ca_account', $updateData);		//更新用户实名认证记录表  ca_account
			$result = $this->db->affected_rows();	//影响记录条数
		} catch (Exception $e) {
			log_message('error',  $e->getMessage());
		}
		return $result;
	}


}